jQuery.fn.image = function (src,width,height) {
    var img = new Image();

    var loader = this;
    jQuery(img).load(function () {
        //$(this).css('display', 'none'); // .hide() doesn't work in Safari when the element isn't on the DOM already
        jQuery(this).hide();
        loader.removeClass('loading').append(this);
        jQuery(this).fadeIn();
    }).error(function () {
        // notify the user that the image could not be loaded
    }).attr('src', src);
};
jQuery.fn.image = function (src,width,height,imgmap) {
    var img = new Image();

    var loader = this;
    jQuery(img).load(function () {
        //$(this).css('display', 'none'); // .hide() doesn't work in Safari when the element isn't on the DOM already
        jQuery(this).hide();
        loader.removeClass('loading').append(this);
        jQuery(this).fadeIn();
    }).error(function () {
        // notify the user that the image could not be loaded
    }).attr('src', src).attr('usemap', imgmap);
};